<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%
	//System.out.println("www:"+request.getParameter("goodsClassListA"));
 %>

<script type="text/javascript">

</script>
<div class="food three clearfix">
	
	<div class="name">
		<%=request.getParameter("pageTitle") %>
		<p class="r">
			<%-- <c:forEach items="<%=request.getParameter("goodsClassListA") %>" var="goods"> --%>
			<%
				String id = request.getParameter("classId");
				//System.out.println("idddddd---"+id);
				if(id!=null && "14".equals(id)){
			 %>	
			 	<c:forEach items="${goodsClassListA}" var="goods">
					<a href="<%=request.getParameter("ctx")%>/goodsClass/queryGoodsClassList?classId=${goods.id}" target="_blank">${goods.name}</a>
				</c:forEach>
			<%	
				}else if(id!=null && "10".equals(id)){
			%>	
				<c:forEach items="${goodsClassListB}" var="goods">
					<a href="<%=request.getParameter("ctx")%>/goodsClass/queryGoodsClassList?classId=${goods.id}" target="_blank">${goods.name}</a>
				</c:forEach>
			<%	
				}else if(id!=null && "32".equals(id)){
			%>
				<c:forEach items="${goodsClassListC}" var="goods">
					<a href="<%=request.getParameter("ctx")%>/goodsClass/queryGoodsClassList?classId=${goods.id}" target="_blank">${goods.name}</a>
				</c:forEach>
			<%
				}
			 %>
			<!-- <a href="">咖啡</a>
			<a href="">牛奶</a>
			<a href="">大闸蟹</a>
			<a href="">小米</a>
			<a href="">人参</a>
			<a href="">麻辣小龙虾</a>
			<a href="">牛肉</a>
			<a href="">虾仁</a>
			<a href="">山竹</a> -->
			<!-- <a href="javascript:void(0)" class="more">查看更多></a> -->
		</p>
	</div>
	<img src="<%=request.getParameter("ctx")%>/images/food01.png" alt="" />
	<ul>
	
			<%
				if(id!=null && "14".equals(id)){
			 %>	
			 <!-- TEST:<input name="name" value="123"/> -->
			 	<c:forEach items="${goodsListA}" var="goods" varStatus="status">
			 		<%-- TEST:<input name="name" value="${status.index}"/> --%>
			 		<c:if test="${status.index+1<9}">
			 		<%-- <c:out value="${status.index}"></c:out> --%>
			 			<li>
						<a href="<%=request.getParameter("ctx")%>/goods/queryGoodsDetail?id=${goods.id}" target="_blank" >
							<c:choose>	
								<c:when test="${goods.picture!=null }">
									<img src="<%=request.getParameter("baseFile")%>${goods.picture}" alt="枕头" />
								</c:when>
								<c:otherwise>
									<img src="<%=request.getParameter("ctx")%>/images/hot04.png" alt="枕头" />
								</c:otherwise>
							</c:choose>	
							
							<div>
								<p class="desc">${goods.name}</p>
								<p class="price">￥${goods.marketPrice}</p>
							</div>
						</a>
					</li>
			 		</c:if>
					
				</c:forEach>
			<%	
				}else if(id!=null && "10".equals(id)){
			%>	
				<%-- <c:foreach begin = "c_list.size()"  end="10" step="1">  --%>
				<c:forEach items="${goodsListB}" var="goods">
					<li>
						<a href="<%=request.getParameter("ctx")%>/goods/queryGoodsDetail?id=${goods.id}" target="_blank">
							<c:choose>	
								<c:when test="${goods.picture!=null }">
									<img src="<%=request.getParameter("baseFile")%>${goods.picture}" alt="枕头" />
								</c:when>
								<c:otherwise>
									<img src="<%=request.getParameter("ctx")%>/images/hot04.png" alt="枕头" />
								</c:otherwise>
							</c:choose>							
							<div>
								<p class="desc">${goods.name}</p>
								<p class="price">￥${goods.marketPrice}</p>
							</div>
						</a>
					</li>
				</c:forEach>
			<%	
				}else if(id!=null && "32".equals(id)){
			%>
				<c:forEach items="${goodsListC}" var="goods">
					<li>
						<a href="<%=request.getParameter("ctx")%>/goods/queryGoodsDetail?id=${goods.id}" target="_blank">
							<c:choose>	
								<c:when test="${goods.picture!=null }">
									<img src="<%=request.getParameter("baseFile")%>${goods.picture}" alt="枕头" />
								</c:when>
								<c:otherwise>
									<img src="<%=request.getParameter("ctx")%>/images/hot04.png" alt="枕头" />
								</c:otherwise>
							</c:choose>
							<div>
								<p class="desc">${goods.name}</p>
								<p class="price">￥${goods.marketPrice}</p>
							</div>
						</a>
					</li>
				</c:forEach>
			<%
				}
			 %>
		
	</ul>
</div>